package webpass

type PasswordSuit interface {
    MakeCipherText(plain_pass string) string

    PasswordVerify(plain_pass string, cipher_pass string) bool
}

var default_pwdsuit PasswordSuit

func init() {

    default_pwdsuit = NewPbkdf2Suit("DP", 1000, 32)
}

func MakePasswordHash(plain_pwd string) string {
    return default_pwdsuit.MakeCipherText(plain_pwd)
}

func PasswordVerify(plain_pwd string, hashed_pwd string) bool {
    return default_pwdsuit.PasswordVerify(plain_pwd, hashed_pwd)
}
